A device has been proposed in which, when a signal such as an image is input, and an attribute or the like of the input signal is discriminated by a discriminator, a reason of a discrimination result is visualized and presented to a user. For example, in the field of an automatic appearance inspection, when a determination is made as to whether an inspection target is normal or abnormal by using an image including an inspection target, if a result of the determination that the inspection target is abnormal and also the a reason for the above-described determination can be provided, this information is useful to the user. That is, when an area corresponding to a cause of the anomaly can be visualized as an image, the user can intuitively find out a determination reference of an automatic appearance inspection apparatus. Accordingly, the above-described configuration is useful when a parameter related to the inspection is adjusted and when the number of occurrences of the particular abnormal patterns is found out to provide a feedback to a process in a production line as a countermeasure to carry out a modification.
For example, PTL 1 discloses that one determination image is created from a plurality of images obtained by shooting the inspection target object under a plurality of illumination conditions, and the normal/abnormal inspection is performed by using the determination image. With regard to the determination image created by the method according to PTL 1, in a case where the inspection target object is determined as abnormal, an area where an anomaly exists is distinguished from the other normal area to be visualized, and a user can easily understand which area is abnormal.
However, the creation of the determination image according to PTL 1 is optimized in accordance with previously set desired inspection items, and it is difficult to cope with a complicated inspection or an unidentified defect.
In view of the above, PTL 2 discloses a method of extracting a previously selected feature amount from an input image and determining whether it is normal or abnormal by using the feature amount without generating the determination image as in PTL 1. According to this method, by previously learning a feature amount that affects the normal or abnormal discrimination without generating the determination image, it is possible to accurately determine whether it is normal or abnormal.
However, even when the method of outputting the inspection result without creating the determination image as in PTL 2 is employed, an analysis on the result may also be desired to be carried out in some cases. That is, although a normal/abnormal discrimination accuracy is extremely important in the appearance inspection of parts, finding out an anomaly cause corresponding to additional information (a type of the anomaly, a location, or the like) and easily grasping a tendency may also be useful information to the user in many cases. According to the method disclosed in PTL 2, a problem occurs that the anomaly cause is not presented to the user.